package cn.ld.module.report.dal.mapper.goview;

import cn.ld.framework.common.pojo.PageParam;
import cn.ld.framework.common.pojo.PageResult;
import cn.ld.framework.mybatis.core.mapper.BaseMapperX;
import cn.ld.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.ld.module.report.dal.entity.goview.GoViewProjectEntity;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface GoViewProjectMapper extends BaseMapperX<GoViewProjectEntity> {

    default PageResult<GoViewProjectEntity> selectPage(PageParam inVO, Long userId) {
        return selectPage(inVO, new LambdaQueryWrapperX<GoViewProjectEntity>()
                .eq(GoViewProjectEntity::getCreator, userId)
                .orderByDesc(GoViewProjectEntity::getId));
    }

}
